<script setup lang="ts">
import {ref} from "vue"
export interface MovieSwiperProps{
  list:string[]
  height:number
  radius:number
  padding:number
}
const {list,height,radius,padding} = defineProps<MovieSwiperProps>()
const emits = defineEmits<{
  (e:'onChange',index:number):void
}>()
const onChange = ({current}:{current: number}):void=>{
  emits("onChange",current)
}
const style = ref(`padding: ${padding}rpx;`)
</script>

<template>
  <view class="swiper" :style="style">
    <u-swiper
        :list="list"
        indicator
        indicatorMode="line"
        circular
        :height="height"
        :radius="radius"
        @change="onChange"
    ></u-swiper>
  </view>
</template>

<style scoped>
</style>